package com.project.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

public class UserBean {
    private int id;
    private String name;
    private String pwd;
    private String email;
    private String face;
    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate creatDate = LocalDate.now();

    public UserBean() {
    }

    public UserBean(String name, String pwd, String email, String face,LocalDate creatDate) {
        this.name = name;
        this.pwd = pwd;
        this.email = email;
        this.face = face;
        this.creatDate = LocalDate.now();
    }

    public UserBean(int id, String name, String pwd, String email, String face) {
        this.id = id;
        this.name = name;
        this.pwd = pwd;
        this.email = email;
        this.face = face;
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getFace() {
        return face;
    }

    public void setFace(String face) {
        this.face = face;
    }

    public LocalDate getCreatDate() {
        return creatDate;
    }

    public void setCreatDate(LocalDate creatDate) {
        this.creatDate = creatDate;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", email='" + email + '\'' +
                ", face='" + face + '\'' +
                ", creatDate=" + creatDate +
                "}\n";
    }
}
